class Main extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            playing:!0,
            canchou: !1,
            type: -1, //1谢谢参与 2周边 3腾讯 4酒
            showresult: !1,
            showinfomodal: !1,
            showafterinfo: !1,
            name: '', phone: '', addr: '',
            piece: {
                one: '',
                two: "",
                three: '',
                four: ''
            }
        };
    }










    componentDidMount() {

        const canvas = document.querySelector('#canvas')
        const ctx = canvas.getContext('2d')
        var I1 = new Image()
        I1.src='./src/first_modalkuang.png'
        var I2 = new Image()
        I2.src='./src/jixubtn.png'

       setTimeout(() => {
           document.getElementById('canvas').width = this.width
           document.getElementById('canvas').height = this.height

           ctx.drawImage(I1,0,0,this.width,this.height)
           ctx.drawImage(I2,this.width-500,300,200,200)
     let  src= canvas.toDataURL('image/png')
       console.log(src,'src');
       
       }, 10);
      
    }





    render() {
        let { myphone, addr, phone,playing, name, type, showafterinfo, showresult, showinfomodal } = this.state

        return (
            <div className="app">
                    <canvas id="canvas"></canvas>

            </div>


        )
    }
}

ReactDOM.render(
    <div>
        {/* <TopLine /> */}
        <div id='body'>

            <Main />
        </div>
    </div>
    // <Barrage />
    , $('.container')[0]
)